#include <DrawingScene.hpp>

Drawing::Scene::~Scene()
{}

Drawing::Scene::Scene()
{}

void Drawing::Scene::animate(Mathing::Matrix4f* matrix)
{
	glMatrixMode(GL_MODELVIEW); 
	glLoadIdentity();
	gluLookAt(  9.0f,  4.0f,  9.0f,
	            0.0f,  0.0f,  0.0f,
	            0.0f,  1.0f,  0.0f );

	glPushMatrix();
	glMultMatrixf( (GLfloat*)matrix );
		this->getRoot()->animate( this->getAnimation()->getCurrentFrame() );
	glPopMatrix();
}

Drawing::Root* Drawing::Scene::createRoot()
{
	if (this->root == NULL)
		this->root = new Drawing::Root();

	return (Drawing::Root*)this->root;
}

Drawing::Root* Drawing::Scene::getRoot()
{
	return (Drawing::Root*)this->root;
}

